Main Page   File List  

[f]WriteRequest.h

00001 //  Write Request - indicate a string has entered GBI.
00002 //     This string would be copied into "in_string" before
00003 //     it is sent down to L2CAP.
00004 
00005 if(Input_Enabled()) { 
00006         if(connection_established){
00007                 /* Input -- "String" -- from the NET module. */
00008                 int j;
00009                 
00010                 /* Put input string in a String variable b4 it's encapsulated in READ */
00011                 strcpy(in_String, Input_Value());
00012                                 
00013                 /* print to analysis window */
00014                 if(IsMaster_Value())
00015                         vccPrintPdxDebugInfo("%_START_ MASTER : GBI <-received [%s] from NET!!! %_END_", in_String);
00016                 else
00017                         vccPrintPdxDebugInfo("%_START_ SLAVE  : GBI <-received [%s] from NET!!! %_END_", in_String);
00018 
00019                 /* Should put string into packet and send it with White_sth.... */
00020                 /* Setup Packet for Data Write - Set Tag for Write_Union_Request and Contents. */
00021                 L2CA_packet_out.Service.__unionTag = L2CA_Service_Union_Write_tag;
00022                 L2CA_packet_out.Service.__union.Write.__unionTag = L2CA_Write_Union_Request_tag;
00023         
00024                 L2CA_packet_out.SourceID = 0x02; /* vccUnsigned8 */
00025                 L2CA_packet_out.Service.__union.Write.__union.Request.CID = CID; /*Channel ID */
00026                 L2CA_packet_out.Service.__union.Write.__union.Request.Length = strlen(in_String); /* Size in bytes of the buffer where data to be transmitted are stored */
00027 
00028                 for(j = 0; j < strlen(in_String); j++){
00029                         L2CA_packet_out.Service.__union.Write.__union.Request.OutBuffer[j] = in_String[j];
00030                 }
00031                 
00032                 L2CA_Packet_Out_Post(&L2CA_packet_out);
00033 
00034                 /* print to analysis window */
00035                 if(IsMaster_Value())
00036                         vccPrintPdxDebugInfo("%_START_ MASTER : GBI ->sent [Write_Request] + String : %s %_END_", in_String);
00037                 else
00038                         vccPrintPdxDebugInfo("%_START_ SLAVE  : GBI ->sent [Write_Request] + String : %s %_END_", in_String);
00039         }
00040 }/*end of Input_Enabled() */
00041 

Generated on Sun May 12 19:02:34 2002 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002